﻿using HDS.Model;
using HDS.Model.Entity.Master;
using HDS.Model.Entity.View;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace HDS.IService.Master
{
    public interface IDistributorService
    {
        #region config

        Task<DistributorConfig> GetConfig(string distributor);

        Task<List<DistributorConfig>> GetConfigList(Expression<Func<DistributorConfig, bool>> whereExpression);

        Task<bool> SaveConfig(string distributor, bool isonline, string remark, int updatedBy, string updatedByName, DateTime updatedTime);

        #endregion

        #region hotel data

        Task<VDistributorHotel> GetHotel(string distributor, int hotelId);

        Task<DataPagingModel<VDistributorHotel>> GetHotelList(int pageIndex, int pageSize, Expression<Func<VDistributorHotel, bool>> whereExpression, string whereSql);

        Task<List<VDistributorRoom>> GetRoomList(string distributor, int hotelId);

        Task<int> AddHotels(string distributor, int[] hotelIds, string[] hotelMd5s, int updatedBy, string updatedByName, DateTime updatedTime);

        Task SetCity(string distributor, int hotelId, string distributorCityId, string distributorCityName, int updatedBy, string updatedByName, DateTime updatedTime);

        Task SetOnline(string[] distributors, int[] hotelIds, int updatedBy, string updatedByName, DateTime updatedTime);

        Task SetOffline(string[] distributors, int[] hotelIds, int updatedBy, string updatedByName, DateTime updatedTime);

        #endregion

        #region supplier config

        Task<DistributorSupplierSetting> GetSupplierSetting(string distributor, string supplier);

        Task<List<DistributorSupplierSetting>> GetSupplierSettingList(Expression<Func<DistributorSupplierSetting, bool>> whereExpression);

        Task<bool> SaveSupplierSetting(DistributorSupplierSetting entity);

        #endregion

        #region hotel setting

        Task<List<DistributorHotelSetting>> GetHotelSettingList(Expression<Func<DistributorHotelSetting, bool>> whereExpression);

        Task<bool> SaveHotelSetting(DistributorHotelSetting entity);

        Task<bool> DeleteHotelSetting(int hotelId, string distributor, string supplier);

        #endregion
    }
}
